/*
 * a_star.h
 *
 *  Created on: 14. sep. 2012
 *      Author: Gaute and Fredrik
 */

#ifndef A_STAR_H_
#define A_STAR_H_

using namespace std;

#include <vector>
#include <map>
#include <queue>
#include <string>

class Node {
	private:
		Node* bestParent;
		vector<Node*> possibleParents;
		vector<Node*> children;
		double g;
		double h;
		double f;
		bool isSolution;
	public:
		
		//Specific to problem 1
		int numbers[9];
		double value;
		void calcValue(void);

		Node();
		Node(int, int);
		double getG(void);
		double getH(void);
		double getF(void);
		void setG(int);
		void setH(int);
		void calcF(void);
		Node* getBestParent(void);
		void setParent(Node*);
		void insertChild(Node*);
		vector<Node*> getChildren();
		bool getIsSolution(void);
		double heuristicFunc(void);
		void makeNodeChildren(void);

		friend bool operator < (const Node& n1, const Node& n2);
};



//map<int, Node> tree;
string aStarPath (int searchProblem, int herusticFuncH);


#endif /* A_STAR_H_ */
